
var ControlPanel = function(){

	var container = new UI.Panel();
    container.setId( 'sidebar' );
    
    var sceneTab = new UI.Text('场景').setTextTransform( 'uppercase' );
	sceneTab.onClick( function () { select( '场景' ) } );

	var projectTab = new UI.Text( '工程' ).setTextTransform( 'uppercase' );
	projectTab.onClick( function () { select( '工程' ) } );

	var settingsTab = new UI.Text( '设置' ).setTextTransform( 'uppercase' );
	settingsTab.onClick( function () { select( '设置' ) } );

	var tabs = new UI.Div();
	tabs.setId( 'tabs' );
	tabs.add( sceneTab, projectTab, settingsTab );
    container.add( tabs );
    

    
	function select( section ) {

		sceneTab.setClass( '' );
		projectTab.setClass( '' );
		settingsTab.setClass( '' );

		// scene.setDisplay( 'none' );
		// project.setDisplay( 'none' );
		// settings.setDisplay( 'none' );

		switch ( section ) {
			case '场景':
				sceneTab.setClass( 'selected' );
				// scene.setDisplay( '' );
				break;
			case '工程':
				projectTab.setClass( 'selected' );
				// project.setDisplay( '' );
				break;
			case '设置':
				settingsTab.setClass( 'selected' );
				// settings.setDisplay( '' );
				break;
		}

	}

	select( 'SCENE' );
    return container;
};